#! /bin/bash

# upgrade system safely every half year.
# next upgrade date:
#	2013-12-30
#
update_time=6
if [ `date +%m` -le 6 ]
then
	echo "next upgrade date is :2013-06-30."
	update_time=6
else
	echo "next upgrade date is :2013-12-30."
	update_time=12
fi

if [ `date +%m` -eq $update_time ]
then
	sudo aptitude safe-upgrade
fi

exit 0

# other upgrade method
#sudo aptitude full-upgrade

#sudo aptitude dist-upgrade

